package com.heima.user.feign;

import com.heima.apis.article.IUserClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.AuthDto;
import com.heima.user.service.ApUserRealnameService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class UserClient implements IUserClient {
    @Autowired
    private ApUserRealnameService apUserRealnameService;

    @Override
    public ResponseResult listApuser(AuthDto authDto) {

        ResponseResult list = apUserRealnameService.list(authDto);

        return list;
    }

    /**
     * 审核失败
     * @param authDto
     * @return
     */
    @Override
    public ResponseResult ApuserByidRealname(AuthDto authDto) {
        ResponseResult list = apUserRealnameService.ApuserByidRealname(authDto);
        return list;
    }

    /**
     * 审核成功
     * @param authDto
     * @return
     */
    @Override
    public ResponseResult authPass(AuthDto authDto) {

        ResponseResult result = apUserRealnameService.authPass(authDto);
        log.info("审核成功，返回结果");
        return result;
    }

}
